 <!DOCTYPE html>
 <html lang="en">
 <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
 </head>
 <body>
    <script>
        const arr = [5,3,2,8,3,11,18,2,6,5,10,12,14,7]
        const result = arr.sort((a,b)=>a - b)
        var min = arr[0]
        const max = arr[arr.length-1]  
        const total = arr.reduce((pre,item)=>item + pre )
        arr.sort((a,b)=>b - a )
        const  setArr = new Set(arr)
        console.log(arr,min,max,total,setArr)

    </script>
 </body>
 </html>
 
